import Vue from 'vue';
import Router from 'vue-router';

const home = () => import('../views/homePage/index.vue');
const detail = () => import('../views/detailPage');
const list = () => import('../views/listPage');
const feedback = () => import('../views/feedbackPage');
Vue.use(Router);
const router = new Router({
  // mode: 'history',
  routes: [
    { path: '/', redirect: '/homecustomerfeedback' },
    { path: '/homecustomerfeedback', meta: { index: 0 }, component: home },
    {
      path: '/detailcustomerfeedback', meta: { index: 2 }, name: 'detail', component: detail,
    },
    {
      path: '/listcustomerfeedback', meta: { index: 1 }, name: 'list', component: list,
    },
    { path: '/feedbackcustomerfeedback', meta: { index: 3 }, component: feedback },

    // { path: '/', redirect: '/homecustomerfeedback' },
    // {
    //     path: 'homecustomerfeedback',
    //     meta: { index: 0 },
    //     component: (resolve) => require(['../views/homePage'], resolve)
    // },
    // {
    //     path: 'detailcustomerfeedback',
    //     meta: { index: 2 },
    //     component: (resolve) => require(['../views/detailPage'], resolve)
    // },
    // {
    //     path: 'listcustomerfeedback',
    //     meta: { index: 1 },
    //     component: (resolve) => require(['../views/listPage'], resolve)
    // },
    // {
    //     path: 'feedbackcustomerfeedback',
    //     meta: { index: 3 },
    //     component: (resolve) => require(['../views/feedbackPage'], resolve)
    // }
  ],
});
export default router;
